import request from '@/utils/requestUtil'

export function fetchAddressList() {
	return request({
		method: 'POST',
		url: '/address/receiveAddress/listByCondition'
	})
}

export function fetchAddressDetail(id) {
	return request({
		method: 'GET',
		url: `/address/receiveAddress/${id}`
	})
}

export function addAddress(data) {
	return request({
		method: 'POST',
		url: '/address/receiveAddress/add',
		data:data
	})
}

export function updateAddress(data) {
	return request({
		method: 'POST',
		url: `/address/receiveAddress/update`,
		data:data
	})
}

export function deleteAddress(id) {
	return request({
		method: 'POST',
		url: `/address/receiveAddress/delete/${id}`
	})
}


export function toParseAddress(data) {
	return request({
		method: 'POST',
		url: `/address/receiveAddress/parseAddress`,
		data: data
	})
}
export function receiveAddressFindId(id) {
	return request({
		method: 'GET',
		url: `/address/receiveAddress/${id}`
	})
}
export function getAddressList() {
	return request({
		method: 'GET',
		url: `/address/address/list`
	})
}
